﻿using System.ComponentModel;

namespace Marmat.Forms
{
    public partial class GridControl
    {

        /// <summary>
        /// 把编辑器指派到个别单元格。
        /// </summary>
        [Browsable(true)]
        [Category("编辑器")]
        [Description("把编辑器指派到个别单元格。")]
        public new event CustomRowCellEditEventHandler CustomRowCellEdit;

        public new delegate void CustomRowCellEditEventHandler(object sender, Views.GridControl.CustomRowCellEditEventArgs e);

        /// <summary>
        /// 单元格编辑器正要被显示时发生，可用来阻止内置编辑器被激活。
        /// </summary>
        [Browsable(true)]
        [Category("编辑器")]
        [Description("单元格编辑器正要被显示时发生，可用来阻止内置编辑器被激活。")]
        public new event ShowingEditorEventHandler ShowingEditor;

        public new delegate void ShowingEditorEventHandler(object sender, Views.GridControl.RowColCancelEventArgs e);

        /// <summary>
        /// 显示编辑器时触发。
        /// </summary>
        [Browsable(true)]
        [Category("编辑器")]
        [Description("显示编辑器时触发。")]
        public new event ShownEditorEventHandler ShownEditor;

        public new delegate void ShownEditorEventHandler(object sender, Views.GridControl.RowColEventArgs e);

        /// <summary>
        /// 离开单元格编辑器时发生，可用来检查内容的合法性。
        /// </summary>
        [Browsable(true)]
        [Category("编辑器")]
        [Description("离开单元格编辑器时发生，可用来检查内容的合法性。")]
        public new event ValidatingEditorEventHandler ValidatingEditor;

        public new delegate void ValidatingEditorEventHandler(object sender, Views.GridControl.ValidateEditEventArgs e);


        /// <summary>
        /// 绘制单元格时发生，用于自定义绘制规则。
        /// </summary>
        [Browsable(true)]
        [Category("自定义绘图")]
        [Description("绘制单元格时发生，用于自定义绘制规则。")]
        public new event CustomDrawCellEventHandler CustomDrawCell;

        public new delegate void CustomDrawCellEventHandler(object sender, Views.GridControl.RowCellCustomDrawEventArgs e);

        /// <summary>
        /// 选择不同数据行后执行，也就是CurrentRow属性发生变化后执行。
        /// </summary>
        /// <remarks></remarks>
        [Category("选择")]
        [Description("选择不同数据行后执行，也就是CurrentRow属性发生变化后执行。")]
        public new event CurrentChangedEventHandler CurrentChanged;

        public new delegate void CurrentChangedEventHandler(object sender, Views.GridControl.GridEventArgs e);

        /// <summary>
        /// 选择不同位置的数据行后执行，也就是Position属性发生变化后执行。
        /// </summary>
        [Category("选择")]
        [Description("选择不同位置的数据行后执行，也就是Position属性发生变化后执行。")]
        public new event PositionChangedEventHandler PositionChanged;

        public new delegate void PositionChangedEventHandler(object sender, Views.GridControl.GridEventArgs e);

        /// <summary>
        /// 在计算行高度的时候执行。
        /// </summary>
        [Category("杂项")]
        [Description("显示快捷菜单之前执行，可以在此禁止显示快捷菜单，或更改要显示的快捷菜单。")]
        public new event BeforeShowContextMenuEventHandler BeforeShowContextMenu;

        public new delegate void BeforeShowContextMenuEventHandler(object sender, Views.GridControl.BeforeShowContextMenuEventArgs e);

        /// <summary>
        /// 单击单元格按钮后执行，通常用于实现一些复杂的输入功能。
        /// </summary>
        [Category("点击")]
        [Description("单击单元格按钮后执行，通常用于实现一些复杂的输入功能。")]
        public new event CellButtonClickEventHandler CellButtonClick;

        public new delegate void CellButtonClickEventHandler(object sender, Views.GridControl.RowColEventArgs e);

        /// <summary>
        /// 点击操作列的时候执行。
        /// </summary>
        [Category("点击")]
        [Description("点击操作列的时候执行。")]
        public new event CellLinkClickEventHandler CellLinkClick;

        public new delegate void CellLinkClickEventHandler(object sender, Views.GridControl.RowColEventArgs e);

        /// <summary>
        /// 提供自定义单元合并行为的能力。
        /// </summary>
        [Browsable(true)]
        [Category("合并")]
        [Description("提供自定义单元合并行为的能力")]
        public new event CellMergeEventHandler CellMerge;

        public new delegate void CellMergeEventHandler(object sender, Views.GridControl.CellMergeEventArgs e);

        /// <summary>
        /// 允许你指定一个自定义编辑器为就地编辑一个列,用于覆盖默认列编辑器,这是默认情况下用于显示和编辑模式。这个事件还允许您在编辑表单中更改编辑器。
        /// </summary>
        [Browsable(true)]
        [Category("编辑器")]
        [Description("允许你指定一个自定义编辑器为就地编辑一个列,用于覆盖默认列编辑器,这是默认情况下用于显示和编辑模式。这个事件还允许您在编辑表单中更改编辑器。")]
        public new event CustomRowCellEditForEditingEventHandler CustomRowCellEditForEditing;

        public new delegate void CustomRowCellEditForEditingEventHandler(object sender, Views.GridControl.CustomRowCellEditEventArgs e);

        /// <summary>
        /// 编辑框中内容发生变化时执行。
        /// </summary>
        [Browsable(true)]
        [Category("属性变更")]
        [Description("编辑框中内容发生变化时执行。")]
        public new event CellValueChangingEventHandler CellValueChanging;

        public new delegate void CellValueChangingEventHandler(object sender, Views.GridControl.CellValueChangingEventArgs e);

        /// <summary>
        /// 某一列的内容被更改后执行，此时列的内容已经是更改后的值。
        /// </summary>
        [Browsable(true)]
        [Category("属性变更")]
        [Description("某一列的内容被更改后执行，此时列的内容已经是更改后的值。")]
        public new event CellValueChangedEventHandler CellValueChanged;

        public new delegate void CellValueChangedEventHandler(object sender, Views.GridControl.CellValueChangingEventArgs e);

        [Browsable(true)]
        [Category("属性变更")]
        public new event ColumnWidthChangedEventHandler ColumnWidthChanged;

        public new delegate void ColumnWidthChangedEventHandler(object sender, Views.GridControl.ColumnEventArgs e);

        /// <summary>
        /// 焦点列变化之后发生。
        /// </summary>
        [Browsable(true)]
        [Category("属性变更")]
        [Description("焦点列变化之后发生。FocusedRowChanged")]
        public new event FocusedColumnChangedEventHandler FocusedColumnChanged;

        public new delegate void FocusedColumnChangedEventHandler(object sender, Views.GridControl.FocusedColumnChangedEventArgs e);

        /// <summary>
        /// 焦点行变化之后发生。
        /// </summary>
        [Browsable(true)]
        [Category("属性变更")]
        [Description("焦点行变化之后发生。")]
        public new event FocusedRowChangedEventHandler FocusedRowChanged;

        public new delegate void FocusedRowChangedEventHandler(object sender, Views.GridControl.FocusedRowChangedEventArgs e);


        /// <summary>
        /// 当行/单元格选择在多个选择模式下发生改变时。
        /// </summary>
        [Browsable(true)]
        [Category("属性变更")]
        [Description("当行/单元格选择在多个选择模式下发生改变时。")]
        public new event SelectionChangedEventHandler SelectionChanged;

        public new delegate void SelectionChangedEventHandler(object sender, Views.GridControl.SelectionChangedEventArgs e);

        /// <summary>
        /// 允许您替换单元格显示文本(对于单元格，使用基于文本框的编辑器)，
        /// 组行文本和筛选菜单项标题。
        /// </summary>
        [Browsable(true)]
        [Category("数据")]
        public new event CustomColumnDisplayTextEventHandler CustomColumnDisplayText;

        public new delegate void CustomColumnDisplayTextEventHandler(object sender, Views.GridControl.CustomColumnDisplayTextEventArgs e);


        /// <summary>
        /// 绘制列标题时发生。
        /// </summary>
        [Browsable(true)]
        [Category("自定义绘图")]
        [Description("绘制列标题时发生。")]
        public new event CustomDrawColumnHeaderEventHandler CustomDrawColumnHeader;

        public new delegate void CustomDrawColumnHeaderEventHandler(object sender, Views.GridControl.ColumnHeaderCustomDrawEventArgs e);
    }
}